package deibay.server.frontend.commands;

import deibay.messages.Message;
import deibay.messages.ReplyReauthenticateClientMsg;
import deibay.server.eventargs.GetItemEventArg;
import deibay.server.eventargs.ReauthenticateEventArg;
import deibay.server.events.GetItemEvent;
import deibay.server.events.ReauthenticateEvent;
import deibay.server.frontend.FrontEndCore;
import deibay.users.User;

public class ReplyReauthenticateClientCommand extends Command{

	public ReplyReauthenticateClientCommand(User user, Message msg) {
		super(user, msg);
	}

	@Override
	public void execute() {
		ReplyReauthenticateClientMsg msg = (ReplyReauthenticateClientMsg)message;
		FrontEndCore.getInstance().getServerConnection().send(new ReauthenticateEvent(new ReauthenticateEventArg(msg.getLogin(), msg.getPassword(), FrontEndCore.getInstance().getServerConnection())));
	}

}
